﻿/** 
 * Copyright / Licence
 * <p>
 * You are free:
 * <li>to Share — to copy, distribute and transmit the work
 * <li>to Remix — to adapt the work
 * </p>
 * <p>
 * Under the following conditions:
 * <li>Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
 * <li>Noncommercial — You may not use this work for commercial purposes.
 * <li>Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * </p>
 * <p>
 * More information can be found here:
 * <br/>
 * http://creativecommons.org/licenses/by-nc-sa/3.0/
 * </p>
 * <p>
 * Please contact Manfred Weber [manfred.weber@gmail.com] if you require a commercial licence
 * </p>
 */
 package org.dschini.data.ui.maps.world {
	
	import org.dschini.utils.*;
	import org.dschini.data.ui.maps.*;
	import org.dschini.data.ui.maps.world.oceania.*;
	
	public class OceaniaMapData extends MapData
	{
		public var tansaniaMapData:TansaniaMapData;
		public var fijiMapData:FijiMapData;
		public var loyaltyIslandsMapData:LoyaltyIslandsMapData;
		public var newZealandMapData:NewZealandMapData;
		public var solomonIslandsMapData:SolomonIslandsMapData;
		public var papuaNewGuineaMapData:PapuaNewGuineaMapData;
		public var westPapuaNewGuineaMapData:WestPapuaNewGuineaMapData;
		public var australiaMapData:AustraliaMapData;
				
		public function OceaniaMapData():void
		{
			_title = "<undefined>";
			locationData = new ExtendedArray();
			countries = new Array();
			backgroundVisible = false;
			countryLinesVisible = true;
			shapeVisible = true;
			
			tansaniaMapData = new TansaniaMapData();
			fijiMapData = new FijiMapData();
			loyaltyIslandsMapData = new LoyaltyIslandsMapData();
			newZealandMapData = new NewZealandMapData();
			solomonIslandsMapData = new SolomonIslandsMapData();
			papuaNewGuineaMapData = new PapuaNewGuineaMapData();
			westPapuaNewGuineaMapData = new WestPapuaNewGuineaMapData();
			australiaMapData = new AustraliaMapData();
		
			countries = [
				tansaniaMapData,
				fijiMapData,
				loyaltyIslandsMapData,
				newZealandMapData,
				solomonIslandsMapData,
				papuaNewGuineaMapData,
				westPapuaNewGuineaMapData,
				australiaMapData
			]
		}
		
		override public function set lang( lang:String ):void
		{
			_lang = lang;
			switch( _lang ){
				case "en":
					_title = "Oceania";
					break;
				case "de":
					_title = "Ozeanien";
					break;
			}
			var i:int;
			for(i=0; i<countries.length; i++){
				MapData(countries[i]).lang = lang;
			}
			for(i=0; i<locationData.length; i++){
				MapLocationData(locationData[i]).lang = lang;
			}
		}
	}
}
